package cn.stylefeng.guns.sys.modular.system.mapper;

import cn.stylefeng.guns.sys.modular.system.entity.BtyCwHuopei;
import cn.stylefeng.guns.sys.modular.system.entity.BtyCwPankui;
import cn.stylefeng.guns.sys.modular.system.entity.CaiwuPankui;
import cn.stylefeng.guns.sys.modular.system.model.params.BtyCwPankuiParam;
import cn.stylefeng.guns.sys.modular.system.model.result.BtyCwPankuiResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 盘亏表 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2021-11-02
 */
public interface BtyCwPankuiMapper extends BaseMapper<BtyCwPankui> {

    /**
     * 获取列表
     *
     * @author 
     * @Date 2021-11-02
     */
    List<BtyCwPankuiResult> customList(@Param("paramCondition") BtyCwPankuiParam paramCondition);

    /**
     * 获取map列表
     *
     * @author 
     * @Date 2021-11-02
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") BtyCwPankuiParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author 
     * @Date 2021-11-02
     */
    Page<BtyCwPankuiResult> customPageList(@Param("page") Page page, @Param("paramCondition") BtyCwPankuiParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author 
     * @Date 2021-11-02
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") BtyCwPankuiParam paramCondition);

    int count(@Param("code") String code, @Param("endTime") Date endTime);

    void delete(@Param("code") String code, @Param("endTime") Date endTime);

    BtyCwPankui getPankui(@Param("shopCode") String shopCode, @Param("endTime") Date endTime);

    void update(BtyCwPankui btyCwPankui);

    void deleteList(@Param("list") List<String> codeList, @Param("endTime") Date endTime);

    void insertList(@Param("list") List<BtyCwPankui> list);

    List<BtyCwPankui> getPankuiByList(@Param("list") List<BtyCwPankui> list, @Param("endTime") Date endTime);

    List<BtyCwPankui> getPankuiList(@Param("list") List<BtyCwHuopei> list, @Param("endTime") Date endTime);

    void updateList(@Param("list") List<BtyCwPankui> list);
}
